import React from 'react';
import './css/style.less';

interface ILoadingDataProps{
  style?: any;
  tips?: string;
}

export default class DataLoading extends React.Component<ILoadingDataProps, any> {
  static defaultProps = {
    tips: "拼命加载中...",
  };

  render() {
    return (<div className="loading-data-class"style={this.props.style}>
      <div className="sk-folding-cube">
        <div className="sk-cube1 sk-cube"></div>
        <div className="sk-cube2 sk-cube"></div>
        <div className="sk-cube4 sk-cube"></div>
        <div className="sk-cube3 sk-cube"></div>
      </div>
      { this.props.tips && <p className="tips">{this.props.tips ? this.props.tips : DataLoading.defaultProps.tips}</p>}
    </div>);
  }

}
